<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="css/ie6.css"/>
<![endif]-->
<link rel="stylesheet" type="text/css"  href="../../../../Public/admin/css/style_v2.0.css"/>
<link rel="stylesheet" type="text/css"  href="../../../../Public/layui/css/layui.css">
<link rel="stylesheet" type="text/css"  href="__PUBLIC__/admin/css/style_v2.0.css"/>
<link rel="stylesheet" type="text/css"  href="__PUBLIC__/layui/css/layui.css">
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/layui/layui.js"></script>
</head>
<body>
<div class="position mt10">当前位置：<a href="{:U('Index/main')}">后台首页</a> > <a href="{:U('Customer/index')}">客户列表</a>  >  客户信息修改</div>
<div id="container">
  <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
      <legend>客户信息修改</legend>
  </fieldset>
<div class="c"></div> 
<form name=reg action="{:U('Admin/Customer/customer_update',array('cid' => $data['cid']))}"  enctype="multipart/form-data"  method="post"  class="layui-form" id="customer_add" >
<div class="layui-form">
    <table class="layui-table">
    <tr>
	  <td width="20%" align="right"><font color=red size="1">·</font>客户姓名：</td>
	  <td width="80%">
      <span class="table_span" style="width:300px; float:left;"><input name="cuname" type="text" id="cuname" value="{$data.cuname}" required  lay-verify="" placeholder="客户姓名" autocomplete="off" class="layui-input"></span>
      <span class="table_txt"></span>
      </td>
    </tr>
    <tr>
	  <td width="20%" align="right"><font color=red size="1">·</font>客户电话：</td>
	  <td width="80%">
      <span class="table_span" style="width:300px; float:left;">
      <input name="cphone" type="text" id="cphone" value="{$data.cphone}"   lay-verify="cphone" placeholder="客户电话" autocomplete="off" class="layui-input"></span>
      </td>
    </tr>
    <tr>
	  <td align="right"><font color=red size="1">·</font>客户微信：</td>
	  <td>
      <span class="table_span" style="width:300px; float:left;"><input name="cwechat" type="text" id="cwechat" value="{$data.cwechat}"  lay-verify="" placeholder="客户微信" autocomplete="off" class="layui-input"></span>
      </td>
    </tr>
    <tr>
	  <td align="right"><font color=red size="1">·</font>客户QQ：</td>
	  <td><span class="table_span" style="width:300px; float:left;"><input name="cqq" type="text" id="cqq" value="{$data.cqq}"  lay-verify="" placeholder="客户QQ" autocomplete="off" class="layui-input"></span>
      </td>
    </tr>
    <tr>
	  <td align="right">客户类型：</td>
	  <td><span class="table_span" style="width:300px; padding-left:0px;">
          <select name="ctype" lay-verify="" lay-filter="">
          <option value="">请选择账号</option>
           <option value="1" <if condition="$data['ctype'] eq 1">selected</if>>直属客户</option>
           <option value="2" <if condition="$data['ctype'] eq 2">selected</if>>渠道</option>
           </volist>
        </select>
      </span>
      </td>
    </tr>
    <tr>
	  <td align="right">其他信息：</td>
	  <td><span class="table_span" style="width:300px; float:left;"><textarea name="content" type="text" id="content" value=""  lay-verify="" placeholder="其他信息" autocomplete="off" class="layui-textarea" style="height:60px;">{$data.content}</textarea></span>
      </td>
    </tr>
    <tr>
	     <td align="right">状态：</td>
	     <td><input type="radio" name="status" value="1" title="合作" <if condition="$data['status'] eq 1">checked </if> > &nbsp;&nbsp;&nbsp; <input type="radio" name="status" value="0" title="不再合作" <if condition="$data['status'] eq 0">checked </if>> </td>
    </tr>
    <tr>
	     <td align="right">排序：</td>
	     <td><span class="table_txt"><input type="text" name="listorder" value="{$data.listorder}" class="layui-input" style="width:50px;"></span>
            <span class="table_txt"><font color="#666666">（越大越靠前）</font></span></td>
        </tr>
	   <td align="right"><font color=red size="1">·</font>添加时间：</td>
	  <td><input name="inputtime" type="text" id="inputtime" value="{$data.inputtime|date='Y-m-d H:i:s',###}"  autocomplete="off"  class="layui-input ico-date"  style="width:250px; float:left;"></td>
	  </tr>
    <tr> 
	  <td colspan=2 align="center" valign="middle">
		<input type="submit" name="Submit" value="确&nbsp; &nbsp;定" class="layui-btn" >
		<input type="reset" name="Submit2" value="重　置" class="layui-btn layui-btn-primary" >		 </td>
	</tr>
    </table>
</div>
</form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
</body>
</html>
<script>

//Demo
layui.use(['form','laydate'], function(){
  var form = layui.form
  ,laydate = layui.laydate;
   //,layer = layui.layer	
   
   $("#quanxian").css('display','none');
   form.on('radio(isowner)', function(data){
        $val = data.value;
		if($val=="" || $val =="0"){
		   $("#quanxian").css('display','');
		   $("#webaccount").css('display','none');
		}else{
		   $("#webaccount").css('display','');
		   $("#quanxian").css('display','none');
		}
   });
   laydate.render({
       elem: '#inputtime'
	   ,type: 'datetime'
   });
   form.verify({
        webname: function(value){
		    if(value !="" || value.length  >0){
			    
			}else{
			   return '请填写网址名称';
			}
		}
		,weburl: function(value){
		    if(value == "" || value.length ==0){
			return '请填写网站域名！';
			}
		}    
	   ,price: function(value){
	       if(value != ""){
			   if(!new RegExp(/^\d*$/).test(value)){
		            return '必须是数字0';
		       }
		   }else{
		      return '请填写价格！'
		   }
	   }
   });
   
   
  //监听提交
  form.on('submit(formSearch)', function(data){
    //layer.msg(JSON.stringify(data.field));
	title: '最终的提交信息'
	return true;
  });

});

</script>